package cn.lf.android.lawfirm.inputsource;

import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import cn.lf.android.lawfirm.BaseActivity;
import cn.lf.android.lawfirm.R;
import cn.lf.android.lawfirm.utils.DebugLog;

/**委托方联系方式添加页
 * Created by Administrator on 2017/8/7.
 */

public class EntrustingTellActivity extends BaseActivity{
    private TextView mTitle;
    private ImageView mImg_Left;
    private TextView mSave;
    private EditText mName;
    private EditText mTell;

    @Override
    public Object getContentResView() {
        return R.layout.activity_entrusting_tell;
    }

    @Override
    public void initView() {
        initTitle();
        mName = ((EditText) findViewById(R.id.et_weituofang_name));
        mTell = ((EditText) findViewById(R.id.et_weituofang_tell));

    }

    @Override
    public void initData() {

    }

    private void initTitle() {
        mTitle = ((TextView) findViewById(R.id.eb_tv_title));
        mTitle.setText("拟委托方联系方式");
        mImg_Left = ((ImageView) findViewById(R.id.img_left));
        mImg_Left.setVisibility(View.VISIBLE);
        mImg_Left.setOnClickListener(this);
        mSave = ((TextView) findViewById(R.id.eb_tv_right));
        mSave.setOnClickListener(this);
        mSave.setVisibility(View.VISIBLE);
        mSave.setText("确认");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.img_left:
                hintKbTwo();
                finish();
                break;
            case R.id.eb_tv_right:
                hintKbTwo();
                DebugLog.e("------保存------");
                DebugLog.e("-11----name----"+mName.getText().toString().trim());
                DebugLog.e("-11-----tell-----"+mTell.getText().toString().trim());
                Intent intent = new Intent();
                intent.putExtra("name",mName.getText().toString().trim());
                intent.putExtra("tell",mTell.getText().toString().trim());
                setResult(RESULT_OK,intent);
                finish();
                break;
        }
    }
}
